package com.ruoyi.personnel.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * 用户注册对象 user_register
 *
 * @author ruoyi
 * @date 2020-02-26
 */
public class UserRegister extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    private Long id;

    /**
     * 微信返回用户唯一标识
     */
    @NotEmpty(message = "openId不允许为null")
    private String openId;

    /**
     * 用户头像图片地址
     */
    @NotEmpty(message = "头像不允许为空")
    private String avatarUrl;

    /**
     * 用户昵称
     */
    @NotEmpty(message = "昵称不允许为空")
    private String nickName;

    /**
     * 性别（0 男；1 女）
     */
    @NotNull(message = "性别不允许为空")
    private Integer gender;

    /**
     * 用户所在国家
     */
    private String country;

    /**
     * 用户所在省份
     */
    private String province;

    /**
     * 用户所在城市
     */
    private String city;

    /**
     * 用户使用的语言
     */
    private String language;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    public String getOpenId() {
        return openId;
    }

    public void setAvatarUrl(String avatarUrl) {
        this.avatarUrl = avatarUrl;
    }

    public String getAvatarUrl() {
        return avatarUrl;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getNickName() {
        return nickName;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public Integer getGender() {
        return gender;
    }

    public void setCountry(String country) {
        this.country = country;
    }

    public String getCountry() {
        return country;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getProvince() {
        return province;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getCity() {
        return city;
    }

    public void setLanguages(String languages) {
        this.language = languages;
    }

    public String getLanguage() {
        return language;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("openId", getOpenId())
                .append("avatarUrl", getAvatarUrl())
                .append("nickName", getNickName())
                .append("gender", getGender())
                .append("country", getCountry())
                .append("province", getProvince())
                .append("city", getCity())
                .append("language", getLanguage())
                .toString();
    }
}
